package com.mpgame;

import com.mpgame.common.network.GrpcServer;
import com.mpgame.common.utils.ConsulUtil;
import com.mpgame.service.ChatSvc;
import com.mpgame.common.constants.Constants.CPorts;

public class SocialServer 
{
    public static void main( String[] args ) throws Exception
    {
        int port = CPorts.SOCIAL_GRPC_PORT;
        GrpcServer server = new GrpcServer(port).registService(new ChatSvc());
        ConsulUtil.registerAgentService("social-service", port);
        server.start();
        server.blockUntilShutdown();
    }
}
